//
//  QMAStartErrorDefine.h
//  QQMiniAppSDK
//
//  Created by guoyanshi on 2023/4/24.
//

#ifndef QMAStartErrorDefine_h
#define QMAStartErrorDefine_h

FOUNDATION_EXPORT NSErrorDomain const QMARequestAppInfoErrorDomain; //请求appInfo错误
NS_ERROR_ENUM(QMARequestAppInfoErrorDomain) {
    QMARequestAppInfoErrorLoginError = -3001,           //登录态校验失败
    QMARequestAppInfoErrorMiniNoExists = -101300003,    //小程序不存在
    QMARequestAppInfoErrorNoVersion = -101300004,       //版本不存在
    QMARequestAppInfoErrorIsExpires = -101300005,       //版本过期
    QMARequestAppInfoErrorLinkError = -101300006,       //输入的url错误
    QMARequestAppInfoErrorSchemaError = -101300008,     //schema 签名错误
    QMARequestAppInfoErrorDstNoExists   = -101300009,   //目标小程序不存在
    QMARequestAppInfoErrorNoAuth = -101300025,          //宿主平台没有授权
    QMARequestAppInfoErrorReqError = -101300026,        //请参数非法
    QMARequestAppInfoErrorProtoError = -101300028,      //数据解包错误
    QMARequestAppInfoErrorNoFoundURL = -101300029,      //没有找到对应的小程序
    QMARequestAppInfoErrorSafe = -101300030,            //安全策略
    QMARequestAppInfoErrorNoRight  = -101304001,        //没有权限
};

FOUNDATION_EXPORT NSErrorDomain const QMAStartupErrorDomain; //启动错误
NS_ERROR_ENUM(QMAStartupErrorDomain) {
    QMAStartupErrorAppInfoError      = -10001,           //AppInfo为空
    QMAStartupErrorJSSDKDownloadFail = -10005,           //基础库下载失败
    QMAStartupErrorJSSDKVerifyFail   = -10006,           //基础库验证失败
    QMAStartupErrorJSSDKUnzipFail    = -10007,           //基础库解压失败
    QMAStartupErrorNotImplemented    = -10008,           //delegate没有实现
    QMAStartupErrorJSSDKNeedUpgrade  = -10009,           //基础库需要升级
    QMAStartupErrorResponseInvalid   = -10012,           //请求失败
    QMAStartupErrorUnpackApkgFail    = -10013,           //unPack小程序Apkg包失败
    QMAStartupErrorValidateFileFail  = -10014,           //验证小程序Apkg包失败
    QMAStartupErrorCreatePathFail    = -10016,           //小程序Apkg包下载存储路径错误
    QMAStartupErrorSystemNotSupport  = -10023,           //设备系统不支持小程序
    QMAStartupErrorMiniAppIsShowing  = -10024,           //已经在显示中
    QMAStartupErrorNotReachable      = -10025,           // 网络不可达
    QMAStartupErrorReadPackageFail   = -10026,           //config文件不存在
    QMAStartupErrorParentVCInvalid   = -10027,           //parentVC无效
    QMAStartupErrorApplicationError  = -10028,            //启动小程序的 Application 错误
};

#endif /* QMAStartErrorDefine_h */
